package com.model.demo.designmodel.observer.guava.gper;

import com.google.common.eventbus.EventBus;

public class GuavaGPer {

    public static void main(String[] args) {
        GPer gper = GPer.getInstance();
        Question qestion = new Question();
        qestion.setUserName("华华");
        qestion.setContent("架构师基本技能");
        Teacher teacher = new Teacher("Lily");
        EventBus eventBus = new EventBus();
        eventBus.register(teacher);
        eventBus.register(gper);
        eventBus.post(qestion);
//        eventBus.unregister(gper);
//        eventBus.post(qestion);

//        EventBus eventBus1 = new EventBus();
//        eventBus.post(qestion);
    }


}
